package edu.washington.ling.syntric.io;

import java.io.IOException;

public abstract class RuleFileWriter {
	private String path;
	
	public RuleFileWriter(String path) throws IOException {
		this.path = path;
	}
	
	public static RuleFileWriter newWriter(String path, String format) throws IOException {
		RuleFileWriter rfw;
		if (format.equals("text"))
			rfw = new RuleFileWriterText(path);
		else if (format.equals("latex"))
			rfw = new RuleFileWriterLaTeX(path);
		else
			rfw = null;
		return rfw;
	}
	public String getPath() {
		return path;
	}
	public abstract void close();
	public abstract void writeRuleRep(RuleRepresentation rr, int count);

}
